﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Domain.Entities;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.MultiTenancy;

namespace Himp.Platform
{
    /// <summary>
    /// 应用模块
    /// </summary>
    public class AppModule : AuditedEntity<Guid>, IMultiTenant
    {
        /// <summary>
        /// 
        /// </summary>
        public Guid ApplicationId { get; set; }

        /// <summary>
        /// 项目空间代码
        /// </summary>
        public string ModuleCode { get; set; }

        /// <summary>
        /// 项目空间名称
        /// </summary>
        public string ModuleName { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public bool DefaultFlag { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public int Srtno { get; set; }

        /// <summary>
        /// 说明
        /// </summary>
        public string? Descr { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public List<AppTopic> AppTopics { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public Guid? TenantId { get; set; }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="namespaceName"></param>
        /// <param name="srtno"></param>
        public AppModule(string moduleCode, string moduleName,Guid applicationId, int srtno, string exp = "-")
        {
            ModuleCode = moduleCode;
            ModuleName = moduleName;
            ApplicationId = applicationId;
            Srtno = srtno;
            DefaultFlag = false;
            Descr = exp;
            AppTopics = new List<AppTopic>();
        }

        public AppModule() { }
    }
}
